<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>banner设置</title>
    <link rel="stylesheet" href="../../css/wxq.css">
    <link rel="stylesheet" href="../../css/base.css">
    <link rel="stylesheet" href="../../font/css/font-awesome.min.css">
</head>
<body>
<!--头部公共样式-->
<header class="header">
    <div class = "logo float_left"><a href="../index/index.html">后台管理系统</a></div>
    <div class = "header_right">
        <nav>
            <ul>

                <li>
                    <a title="更多"><i class = "fa fa-navicon"></i></a>
                    <ul class="dropdown_menu">
                        <li id = "logout">&nbsp;<i class = "fa fa-sign-out"></i>&nbsp;退出</li>
                    </ul>
                </li>
                <li>
                    <a href="../message/messages.html" title = "消息"><i class = "fa fa-envelope"></i></a>
                    <span class="message_count"></span>
                </li>
            </ul>
        </nav>
        <div class = "message_warp_info"></div>
    </div>
</header>

<!--主内容区-->
<div class="container">
    <!--左边导航区-->
    <div class="slide" id ="slide">

        <!--左边管理员信息区域-->
        <div class = "admin_info">
            <a href="#" class = "admin_header_img">
                <img src="../../images/test_header.png" alt="">
                <div class = "upload_header_img">更换</div>
            </a>
            <div class = "admin_detail">
                <span class = "admin_type">超级管理员</span>
                <span class = "admin_name">王小强</span>
            </div>
        </div>

        <!--左边导航按钮区域-->
        <ul class = "menu" >
            <li>
                <a href="../index/index.html" class="super_menu">
                    <i class="fa fa-home"></i>&nbsp;&nbsp;首页
                </a>
            </li>
            <li>
                <a class="super_menu active">
                    <i class="fa fa-gears"></i>&nbsp;&nbsp;系统配置<i class="fa fa-angle-right"></i>
                </a>
                <ul class = "menu_child_list" style="display: block">
                    <li>
                        <a href="bannerSetting.html">
                            <i class="fa fa-image"></i>&nbsp;&nbsp;banner管理
                        </a>
                    </li>
                </ul>
            </li>

            <li>
                <a class="super_menu">
                    <i class="fa fa-users"></i>&nbsp;&nbsp;用户管理<i class="fa fa-angle-right"></i>
                </a>
                <ul class = "menu_child_list isSuper">
                    <li>
                        <a href="../user/userList.html">
                            <i class="fa fa-user"></i>&nbsp;&nbsp;用户列表
                        </a>
                    </li>
                    <li>
                        <a href="../member/memberManagement.html">
                            <i class="fa fa-user-plus"></i>&nbsp;&nbsp;会员管理
                        </a>
                    </li>
                    <li>
                        <a href="../member/integralSetting.html">
                            <i class="fa fa-vcard"></i>&nbsp;&nbsp;积分设置
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a class="super_menu">
                    <i class="fa fa-cart-plus"></i>&nbsp;&nbsp;商城管理<i class="fa fa-angle-right"></i>
                </a>
                <ul class = "menu_child_list isSuper">
                    <li>
                        <a href="../category/goodsCategory.html">
                            <i class="fa fa-bar-chart"></i>&nbsp;&nbsp;商品分类
                        </a>
                    </li>
                    <li>
                        <a href="../freight/freightTemplate.html">
                            <i class="fa fa-cart-arrow-down"></i>&nbsp;&nbsp;运费模板
                        </a>
                    </li>
                    <li>
                        <a href="../goods/goodsList.html">
                            <i class="fa fa-list"></i>&nbsp;&nbsp;商品列表
                        </a>
                    </li>
                    <li>
                        <a href="../order/orderList.html">
                            <i class="fa fa-first-order"></i>&nbsp;&nbsp;订单管理
                        </a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="../message/messages.html" class="super_menu">
                    <i class="fa fa-comment"></i>&nbsp;&nbsp;消息管理
                </a>
            </li>
            <li>
                <a href="../index/dataStatistics.html" class="super_menu">
                    <i class="fa fa-signal"></i>&nbsp;&nbsp;数据统计
                </a>
            </li>
            <li>
                <a href="../admin/authoritySetting.html" class="super_menu">
                    <i class="fa fa-unlock"></i>&nbsp;&nbsp;权限管理
                </a>
            </li>
        </ul>
    </div>

    <!--内容区-->
    <div class="main_content"  id = "banner">
        <div class="warp">
            <div class = "position">
                <span>当前位置：</span>
                <span>
                    <a>系统设置/</a>
                    <a href="bannerSetting.html">banner设置</a>
                </span>
            </div>
        </div>

        <div class="warp">
            <table class="table table_border table_border_left">
                <thead>
                <tr>
                    <th :colspan="resources.bannerImgList.length">banner图片</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td v-for = "(item , index) in resources.bannerImgList">
                        <img width='100' style = 'margin:10px 10px 10px 0px;max-height: 80px' :src = 'resources.imgPath+item.img_url'/>
                        <span style="display: block ;text-align: center">
                            <a class="cursor_p" @click="deleteBanner" :banner-id="item.id">删除</a>
                            <a class="cursor_p" @click="preEdit" :banner-id="item.id">编辑</a>
                        </span>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <div class="warp">
            <div>
                <div class = "form_item">
                    <label for="sort_order" class="form_label">优先级</label>
                    <div class = "input_div_block input_t_single">
                        <input type="number" id="sort_order" v-if="resources.currentBanner" :value="resources.currentBanner.sort_order" class = "form_input">
                        <input type="number" id="sort_order" v-if="!resources.currentBanner" placeholder="数字越大越靠前" class = "form_input">
                    </div>
                </div>
                <div class = "form_item">
                    <label for="banner_desc" class="form_label">描述</label>
                    <div class = "input_div_block input_t_single">
                        <textarea  id="banner_desc" v-if="resources.currentBanner" :value="resources.currentBanner.banner_desc" class = "form_textarea" ></textarea>
                        <textarea  id="banner_desc" v-if="!resources.currentBanner" placeholder="描述" class = "form_textarea" ></textarea>
                    </div>
                </div>

                <div class = "form_item">
                    <label  class="form_label">图片</label>
                    <div class = "input_div_block input_t_single">
                        <label for="pic_banner" class = "form_input file_over"><span>选择图片</span></label>
                        <input type="file" id = "pic_banner" v-on:change="addBannerImg" class = "form_input hidden">
                        <div class = "input_div_block" >
                            <span style="display: inline-block" >
                                <img width='150' style = 'margin:10px 10px 10px 0px;max-height: 80px' v-if="resources.tempPath" :src = 'resources.imgPath+resources.tempPath'/>
                            </span>
                        </div>
                    </div>
                </div>

                <div class = "form_item">
                    <label for="submit" class="form_label"></label>
                    <div class = "input_div_block input_t_single" id = "submit">
                        <button class="btn btn_default" @click = "sendInfo">提交</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src = "../../js/jquery-3.2.1.min.js"></script>
<script src="../../my_js/sockjs.min.js"></script>
<script src="../../my_js/stomp.min.js"></script>
<script src = "../../js/wxq.js"></script>
<script src = "../../my_js/common.js"></script>
<script src = "../../js/vue.min.js"></script>
<script src = "../../js/nicevalidate.js"></script>
<script src = "../../my_js/bannerSetting.js"></script>


</body>
</html>